import cv2
import matplotlib.pyplot as plt
img = cv2.imread("C:/Users/liuyue/code.png")
img2 = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY)
img2 = cv2.inRange(img2, lowerb=160, upperb=255)
plt.subplot(121), plt.imshow(img)  # 原始图片
plt.subplot(122), plt.imshow(img2)  # 降噪图片
plt.show()


from HTMLTestRunner import HTMLTestRunner


runner = HTMLTestRunner()